/**
 * 
 */
package com.p2p.base.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.p2p.base.dao.LoginLogDao;
import com.p2p.base.model.LoginLog;
import com.p2p.base.model.LoginLog.TypeEnum;
import com.p2p.base.service.LoginLogService;

/**
 * @author ruiqi
 *
 */

@Service("loginLogService")
public class LoginLogServiceImpl implements LoginLogService {

	@Resource
	private LoginLogDao loginLogDao;
	
	@Override
	public void create(LoginLog loginLog) {
		loginLogDao.create(loginLog);
	}

	@Override
	public void create(String uid, String ip, TypeEnum type) {
		LoginLog loginLog = new LoginLog();
		loginLog.setUid(uid);
		loginLog.setIp(ip);
		loginLog.setType(type.name());
		this.create(loginLog);
	}


}
